<?php

/**
 * Input3monthsForecast form base class.
 *
 * @method Input3monthsForecast getObject() Returns the current form's model object
 *
 * @package    TMD
 * @subpackage form
 * @author     Thaihosting
 */
abstract class BaseInput3monthsForecastForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'DTTIME_FORECAST' => new sfWidgetFormInputHidden(),
      'DTSAVE_TIME'     => new sfWidgetFormDateTime(),
      'IUSER_ID'        => new sfWidgetFormInputText(),
      'SDOC_LINK'       => new sfWidgetFormInputText(),
      'SDOC_LINK_ENG'   => new sfWidgetFormInputText(),
      'DTLAST_MODIFIED' => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'DTTIME_FORECAST' => new sfValidatorChoice(array('choices' => array($this->getObject()->getDttimeForecast()), 'empty_value' => $this->getObject()->getDttimeForecast(), 'required' => false)),
      'DTSAVE_TIME'     => new sfValidatorDateTime(),
      'IUSER_ID'        => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
      'SDOC_LINK'       => new sfValidatorString(array('max_length' => 200, 'required' => false)),
      'SDOC_LINK_ENG'   => new sfValidatorString(array('max_length' => 200, 'required' => false)),
      'DTLAST_MODIFIED' => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('input3months_forecast[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Input3monthsForecast';
  }


}
